Skip to content

feat: support dot-path in slicingArguments - #2801

Merged
ysmolski merged 24 commits into
mainfrom
yury/eng-9338-router-support-dot-path-in-slicingarguments
May 18, 2026
Merged

feat: support dot-path in slicingArguments#2801
ysmolski merged 24 commits into
mainfrom
yury/eng-9338-router-support-dot-path-in-slicingarguments

Conversation

@ysmolski

@ysmolski ysmolski commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

When the list size comes from an argument nested in an input object,
use a dot-separated path in slicingArguments:

input PaginationInput {  first: Int }
input SearchInput {  pagination: PaginationInput }
type Query {
  search(input: SearchInput!): [Book]  @listSize(slicingArguments: ["input.pagination.first"])
}

This PR contains composition and router changes Composition passes slices argiments in the the same
fields, but this time it parses and validates the dot-path for each slicingArgument.

One small caveat. We should release this in the composition after the router has support for the same feature.
Otherwise, if a user composes config with dot-path slicingArguments and feeds to the router without support of it, then router will throw the error "400" for queries on fields having requireOneSlicingArgument == true. It is because router will ignore such dot-path fields and validation won't pass. Right now it is impossible to release router part first because it depends on the changes in composition so I will release it at the same time.

I will make a note on the documentation about these features requiring specific versions of composition and router.

Summary by CodeRabbit

  • New Features
    • Added a paged search query with ProductSearchInput/ProductSearchPagination and server-side page-size cap.
  • Bug Fixes
    • Support dot-separated nested slicingArguments for @listSize with clearer, path-specific validation and error messages.
    • Broadened assumed-size/default-value checks to inspect defaults across nested slicing chains.
  • Tests
    • Expanded tests for nested-path slicingArguments, normalization, defaults, and router error scenarios.
  • Documentation
    • Added guidance on nested paths in slicingArguments.
  • Chores
    • Updated Go module dependency versions.

Review Change Stack

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a89a6519-008c-42d1-b73c-65cc0e19edfa

📥 Commits

Reviewing files that changed from the base of the PR and between aabb5c5 and cc81248.

📒 Files selected for processing (1)
  • router-tests/security/costs_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • router-tests/security/costs_test.go

Walkthrough

This PR extends the @listSize directive to accept dot-separated slicingArguments paths into input objects, adds per-segment validation and three new error messages, records resolved argument chains for default-value checks when assumedSize is used, and includes tests, demo schema/resolver, docs, and router integration tests.

Changes

Nested-Path Slicing Arguments Support

Layer / File(s) Summary
Error Message Definitions
composition/src/errors/errors.ts
Three new error message functions added and two existing message signatures updated to use path as the parameter.
Normalization Imports
composition/src/v1/normalization/normalization-factory.ts
Import new error helpers and period constant to enable dot-path parsing and granular validation feedback.
Path Parsing & Initial Validation
composition/src/v1/normalization/normalization-factory.ts
Parse dot-separated slicingArguments, reject malformed paths, and ensure the first segment matches a top-level argument.
Traversal & Segment Validation
composition/src/v1/normalization/normalization-factory.ts
Traverse intermediate input object fields, emit segment-not-found or not-input-object errors, and require the leaf to be Int or Int!.
Chain Tracking & Default Checks
composition/src/v1/normalization/normalization-factory.ts
Record the full resolved InputValueData chain for each slicing path and check defaults across the chain when assumedSize is present.
Tests & Fixtures
composition/tests/v1/directives/listSize.test.ts
New nested-path slicingArguments test suite, exports new error helpers for tests, extended cost assertions, and many fixtures covering nested, malformed, and default scenarios.
Demo Schema & Resolver
demo/.../schema.graphqls, demo/.../model/models_gen.go, demo/.../schema.resolvers.go
Adds ProductSearchInput/ProductSearchPagination, searchThings(input: ProductSearchInput!) using @listSize(input.pagination.first), and a SearchThings resolver enforcing a max size.
Router Integration Tests
router-tests/security/costs_test.go
Adds tests asserting dot-path slicingArgument overrides EstimatedListSize and that missing nested ints produce validation 400s.
Docs
docs-website/router/security/cost-control.mdx
New "Nested paths in slicingArguments" subsection describing syntax, example, and validation rules.
Module & Introspection Updates
router-tests/go.mod, router/go.mod, router-tests/operations/testdata/introspection/base-graph-schema.json
Bump github.com/wundergraph/graphql-go-tools/v2 to v2.3.0 and add introspection entries for new query and input types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • wundergraph/cosmo#2716: Adjusts directive validation/processing for slicing-argument handling with input objects.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary feature: adding support for dot-path syntax in slicingArguments for nested field references in input objects.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

@ysmolski
ysmolski requested a review from jensneuse as a code owner April 28, 2026 09:30
@codecov

codecov Bot commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.13084% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.50%. Comparing base (0183ee3) to head (cc81248).

Files with missing lines Patch % Lines
...tion/src/v1/normalization/normalization-factory.ts 97.36% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            main    #2801       +/-   ##
==========================================
+ Coverage   1.49%   46.50%   +45.00%     
==========================================
  Files        315     1085      +770     
  Lines      44219   146198   +101979     
  Branches     451     9413     +8962     
==========================================
+ Hits         663    67990    +67327     
- Misses     43252    76468    +33216     
- Partials     304     1740     +1436     
Files with missing lines Coverage Δ
composition/src/errors/errors.ts 82.20% <100.00%> (ø)
...tion/src/v1/normalization/normalization-factory.ts 89.90% <97.36%> (ø)

... and 768 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown

Router-nonroot image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-fa40a3d25a3540fcf5fe669508216b49fc493b22-nonroot

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@composition/src/v1/normalization/normalization-factory.ts`:
- Around line 2665-2670: The code currently uses only the first segment
(firstSegment) when reporting a missing root argument, which loses the full SDL
path; change the error creation to pass the full configured argument path (e.g.,
the original slicing argument string or segments.join(".")/slicingArg) into
listSizeInvalidSlicingArgumentErrorMessage instead of firstSegment so the
diagnostic shows the full path; update the call site where argData is checked
(the block referencing segments, firstSegment, argData, errorMessages, and
listSizeInvalidSlicingArgumentErrorMessage) to supply the full path string and
ensure any helpers expecting just the name are adjusted to accept the dotted
path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3479e173-63e7-462f-aee0-ad2ba57ad429

📥 Commits

Reviewing files that changed from the base of the PR and between f5929be and 28c3064852a3a0851bc10d6f3aa1a9dfa1e9f1c8.

📒 Files selected for processing (4)
  • composition-go/index.global.js
  • composition/src/errors/errors.ts
  • composition/src/v1/normalization/normalization-factory.ts
  • composition/tests/v1/directives/listSize.test.ts

Comment thread composition/src/v1/normalization/normalization-factory.ts
Base automatically changed from yury/eng-8700-router-support-cost-on-the-arguments-of-directives to main April 29, 2026 11:28
@ysmolski
ysmolski requested review from a team, Noroth, SkArchon, devsergiy and endigma as code owners April 29, 2026 11:28
@ysmolski
ysmolski force-pushed the yury/eng-9338-router-support-dot-path-in-slicingarguments branch from c9873ed to 6bf922d Compare May 6, 2026 13:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
composition/src/errors/errors.ts (1)

1789-1797: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Generalize the non-Int message for nested paths.

With dot-path support, this can now describe a nested input field rather than a top-level argument, so the current "references an argument of type" wording is inaccurate for valid new inputs like input.pagination.first.

Suggested wording
 export function listSizeSlicingArgumentNotIntErrorMessage(
   directiveCoords: DirectiveArgumentCoords,
   argumentName: ArgumentName,
   actualType: TypeName,
 ): string {
   return (
-    ` The "slicingArguments" value "${argumentName}" on "${directiveCoords}" references an argument of type` +
+    ` The "slicingArguments" value "${argumentName}" on "${directiveCoords}" references a value of type` +
     ` "${actualType}", but slicing arguments must be of type "Int" or "Int!".`
   );
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composition/src/errors/errors.ts` around lines 1789 - 1797, The error string
in listSizeSlicingArgumentNotIntErrorMessage is specific to top-level arguments
("references an argument of type") but must cover nested dot-paths (input
fields) as well; update the returned message to use a generalized phrase like
"references a value of type" or "references an input value of type" so the
function listSizeSlicingArgumentNotIntErrorMessage(directiveCoords,
argumentName, actualType) correctly describes both arguments and nested input
fields when actualType is not Int/Int!.
🧹 Nitpick comments (2)
composition/src/v1/normalization/normalization-factory.ts (1)

2669-2670: Gate dotted slicingArguments on router support.

These paths are now serialized into costs.listSizes unchanged. If composition ships before router support, older routers can ignore them and start rejecting requests for fields that still require a slicing argument. Consider enforcing this with a compatibility check, feature gate, or rollout guard instead of relying on release ordering alone.

Also applies to: 2758-2759

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composition/src/v1/normalization/normalization-factory.ts` around lines 2669
- 2670, Paths are being unconditionally added to listSizeConfig.slicingArguments
and slicingArgChainByPath (slicingArgPath / slicingArgChainByPath), which causes
costs.listSizes to serialize slicing arguments even when downstream routers may
not support them; add a compatibility gate before pushing/setting these values:
detect router support (e.g., via a feature flag or a runtime check like
routerSupportsSlicingArgs(costs) or enableRouterSlicingArgs) and only call
listSizeConfig.slicingArguments.push(slicingArgPath) and
slicingArgChainByPath.set(slicingArgPath, chain) when the gate returns true;
apply the same guarded change for the identical block around lines where slicing
arguments are added (the other occurrence at the reported range 2758-2759).
composition/tests/v1/directives/listSize.test.ts (1)

655-676: ⚡ Quick win

Add a normalized-SDL assertion for a nested-path happy path.

The new success cases only verify costs.listSizes, so a regression in emitted composition output would still pass. Please mirror the earlier normalization checks with at least one assertion that schemaToSortedNormalizedString(schema) preserves @listSize(slicingArguments: ["input.pagination.first"])—ideally also for the mixed flat+nested case.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composition/tests/v1/directives/listSize.test.ts` around lines 655 - 676, Add
assertions that verify the normalized SDL still emits the `@listSize` directive
with the nested slicingArguments: after the existing checks in the "nested-path
slicingArguments tests" (in the tests using subgraphWithDeepNestedSlicingArg and
subgraphWithMixedSlicingArgs / ROUTER_COMPATIBILITY_VERSION_ONE), call
schemaToSortedNormalizedString(schema) on the returned schema and assert the
string contains '@listSize(slicingArguments: ["input.pagination.first"])' for
the deep-nested case and contains the corresponding combined form (e.g.
'@listSize(slicingArguments: ["limit","input.pagination.first"])') for the mixed
case; keep these assertions alongside the existing checks that reference
costs.listSizes.get('Query.search') so the test covers both runtime cost
normalization and the emitted normalized SDL.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@composition/src/errors/errors.ts`:
- Around line 1789-1797: The error string in
listSizeSlicingArgumentNotIntErrorMessage is specific to top-level arguments
("references an argument of type") but must cover nested dot-paths (input
fields) as well; update the returned message to use a generalized phrase like
"references a value of type" or "references an input value of type" so the
function listSizeSlicingArgumentNotIntErrorMessage(directiveCoords,
argumentName, actualType) correctly describes both arguments and nested input
fields when actualType is not Int/Int!.

---

Nitpick comments:
In `@composition/src/v1/normalization/normalization-factory.ts`:
- Around line 2669-2670: Paths are being unconditionally added to
listSizeConfig.slicingArguments and slicingArgChainByPath (slicingArgPath /
slicingArgChainByPath), which causes costs.listSizes to serialize slicing
arguments even when downstream routers may not support them; add a compatibility
gate before pushing/setting these values: detect router support (e.g., via a
feature flag or a runtime check like routerSupportsSlicingArgs(costs) or
enableRouterSlicingArgs) and only call
listSizeConfig.slicingArguments.push(slicingArgPath) and
slicingArgChainByPath.set(slicingArgPath, chain) when the gate returns true;
apply the same guarded change for the identical block around lines where slicing
arguments are added (the other occurrence at the reported range 2758-2759).

In `@composition/tests/v1/directives/listSize.test.ts`:
- Around line 655-676: Add assertions that verify the normalized SDL still emits
the `@listSize` directive with the nested slicingArguments: after the existing
checks in the "nested-path slicingArguments tests" (in the tests using
subgraphWithDeepNestedSlicingArg and subgraphWithMixedSlicingArgs /
ROUTER_COMPATIBILITY_VERSION_ONE), call schemaToSortedNormalizedString(schema)
on the returned schema and assert the string contains
'@listSize(slicingArguments: ["input.pagination.first"])' for the deep-nested
case and contains the corresponding combined form (e.g.
'@listSize(slicingArguments: ["limit","input.pagination.first"])') for the mixed
case; keep these assertions alongside the existing checks that reference
costs.listSizes.get('Query.search') so the test covers both runtime cost
normalization and the emitted normalized SDL.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af468a49-15fd-4b85-baa3-b5b70aea3fd3

📥 Commits

Reviewing files that changed from the base of the PR and between 28c3064852a3a0851bc10d6f3aa1a9dfa1e9f1c8 and 6bf922d.

📒 Files selected for processing (4)
  • composition-go/index.global.js
  • composition/src/errors/errors.ts
  • composition/src/v1/normalization/normalization-factory.ts
  • composition/tests/v1/directives/listSize.test.ts

@ysmolski ysmolski changed the title feat: support dot-path in slicingArguments in composition feat(composition): support dot-path in slicingArguments May 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@composition/src/v1/normalization/normalization-factory.ts`:
- Around line 2754-2758: The current check on listSizeConfig.slicingArguments
uses slicingArgChainByPath.get(...) and rejects the path if chain.some(node =>
node.defaultValue) — instead, for each node in the chain that has a defaultValue
you must try to resolve the remainder of the dotted path through that node's
defaultValue AST and only treat it as a blocking default if that resolution
actually yields a leaf value for the targeted slicing argument; if the ancestor
defaultValue does not contain/resolve the remaining path segments, it should not
trigger listSizeAssumedSizeSlicingArgDefaultErrorMessage(directiveCoords,
slicingArgPath). Implement a resolver that walks the defaultValue AST along the
tail path from that node and only push the error when the resolved value is
present (or explicitly null/defined per current semantics).
- Around line 2625-2639: The current branch conflates "undefined parent type"
and "parent type not an input object", causing a duplicate segmentNotInputObject
error; update the logic around
parentDefinitionDataByTypeName.get(current.namedTypeName) so that: if
unwrapped.kind === Kind.LIST_TYPE keep the existing error; else if
parentTypeData is undefined set isPathInvalid = true but do NOT call
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage; else if
parentTypeData.kind !== Kind.INPUT_OBJECT_TYPE_DEFINITION then push the
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage and set isPathInvalid =
true. Reference symbols: parentDefinitionDataByTypeName, current, unwrapped,
Kind.LIST_TYPE, parentTypeData.kind, Kind.INPUT_OBJECT_TYPE_DEFINITION,
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage, isPathInvalid.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f90da03-7acc-4721-84d6-ec00d8609a7f

📥 Commits

Reviewing files that changed from the base of the PR and between b0fc41f and 6c37569.

📒 Files selected for processing (1)
  • composition/src/v1/normalization/normalization-factory.ts

Comment thread composition/src/v1/normalization/normalization-factory.ts
Comment thread composition/src/v1/normalization/normalization-factory.ts Outdated
Comment thread composition/src/v1/normalization/normalization-factory.ts Outdated

@Aenimus Aenimus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ysmolski ysmolski changed the title feat(composition): support dot-path in slicingArguments feat: support dot-path in slicingArguments May 7, 2026
@github-actions github-actions Bot added the router label May 7, 2026
@github-actions github-actions Bot removed the monorepo label May 11, 2026

@dkorittki dkorittki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Added some comments for optional changes. Up to you if you want to follow them, it's nothing critical.

Comment thread composition/tests/v1/directives/listSize.test.ts
Comment thread composition/src/v1/normalization/normalization-factory.ts
Comment thread composition/src/v1/normalization/normalization-factory.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
router/go.mod (1)

46-47: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

router/go.mod pins vulnerable otel/sdk versions in multiple locations.

Lines 46, 47, 192, and 193 all pin go.opentelemetry.io/otel/sdk (and its /metric submodule) below the required minimum of v1.40.0. Update all four to v1.40.0 or later:

Proposed patch
-	go.opentelemetry.io/otel/sdk v1.39.0
+	go.opentelemetry.io/otel/sdk v1.40.0
-	go.opentelemetry.io/otel/sdk/metric v1.39.0
+	go.opentelemetry.io/otel/sdk/metric v1.40.0
...
-	go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.28.0
+	go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.40.0
-	go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v1.28.0
+	go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v1.40.0
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@router/go.mod` around lines 46 - 47, Update the pinned versions of the
OpenTelemetry SDK modules: replace every occurrence of
go.opentelemetry.io/otel/sdk and go.opentelemetry.io/otel/sdk/metric in go.mod
with v1.40.0 (or later) so all references meet the minimum required version;
ensure you update all instances (both top-level and metric submodule entries) to
the same new version and run go mod tidy to refresh the go.sum.
♻️ Duplicate comments (1)
composition/src/v1/normalization/normalization-factory.ts (1)

2627-2641: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Skip the extra segmentNotInputObject error when the intermediate type is undefined.

If current.namedTypeName is missing from parentDefinitionDataByTypeName, normalization already reports that undefined type later. Emitting listSizeSlicingArgumentSegmentNotInputObjectErrorMessage here adds a second, misleading @listSize error for the same root cause.

Suggested adjustment
               const unwrapped = current.type.kind === Kind.NON_NULL_TYPE ? current.type.type : current.type;
               const parentTypeData = this.parentDefinitionDataByTypeName.get(current.namedTypeName);
+              if (!parentTypeData && !BASE_SCALARS.has(current.namedTypeName)) {
+                isPathInvalid = true;
+                break;
+              }
               if (
                 unwrapped.kind === Kind.LIST_TYPE ||
                 !parentTypeData ||
                 parentTypeData.kind !== Kind.INPUT_OBJECT_TYPE_DEFINITION
               ) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composition/src/v1/normalization/normalization-factory.ts` around lines 2627
- 2641, The code is emitting
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage even when
parentDefinitionDataByTypeName lacks an entry for current.namedTypeName; change
the conditional so the segment-not-input-object error is only pushed when
parentTypeData is present but its kind is not Kind.INPUT_OBJECT_TYPE_DEFINITION
(and unwrapped.kind is not Kind.LIST_TYPE), i.e. check parentTypeData existence
separately and avoid calling
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage when parentTypeData is
undefined; update the branch around
parentDefinitionDataByTypeName.get(current.namedTypeName), unwrapped,
Kind.LIST_TYPE, listSizeSlicingArgumentSegmentNotInputObjectErrorMessage,
directiveCoords, slicingArgPath, current.name, printTypeNode(...) and
isPathInvalid accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@router-tests/go.mod`:
- Around line 36-37: Update the pinned OpenTelemetry SDK versions to mitigate
CVE-2026-24051 by changing any instances of go.opentelemetry.io/otel/sdk and
go.opentelemetry.io/otel/sdk/metric from v1.39.0 (and any replace entries at
v1.28.0) to v1.40.0 or later in router-tests/go.mod; ensure you update both the
require block and any replace directives referring to these modules so they
consistently use >= v1.40.0 and then run go mod tidy to refresh go.sum.

---

Outside diff comments:
In `@router/go.mod`:
- Around line 46-47: Update the pinned versions of the OpenTelemetry SDK
modules: replace every occurrence of go.opentelemetry.io/otel/sdk and
go.opentelemetry.io/otel/sdk/metric in go.mod with v1.40.0 (or later) so all
references meet the minimum required version; ensure you update all instances
(both top-level and metric submodule entries) to the same new version and run go
mod tidy to refresh the go.sum.

---

Duplicate comments:
In `@composition/src/v1/normalization/normalization-factory.ts`:
- Around line 2627-2641: The code is emitting
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage even when
parentDefinitionDataByTypeName lacks an entry for current.namedTypeName; change
the conditional so the segment-not-input-object error is only pushed when
parentTypeData is present but its kind is not Kind.INPUT_OBJECT_TYPE_DEFINITION
(and unwrapped.kind is not Kind.LIST_TYPE), i.e. check parentTypeData existence
separately and avoid calling
listSizeSlicingArgumentSegmentNotInputObjectErrorMessage when parentTypeData is
undefined; update the branch around
parentDefinitionDataByTypeName.get(current.namedTypeName), unwrapped,
Kind.LIST_TYPE, listSizeSlicingArgumentSegmentNotInputObjectErrorMessage,
directiveCoords, slicingArgPath, current.name, printTypeNode(...) and
isPathInvalid accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d481c4e0-aaaf-4cfd-b3e1-0934ec4a4e19

📥 Commits

Reviewing files that changed from the base of the PR and between b0fc41f and aabb5c5.

⛔ Files ignored due to path filters (2)
  • router-tests/go.sum is excluded by !**/*.sum
  • router/go.sum is excluded by !**/*.sum
📒 Files selected for processing (8)
  • composition/src/errors/errors.ts
  • composition/src/v1/normalization/normalization-factory.ts
  • composition/tests/v1/directives/listSize.test.ts
  • docs-website/router/security/cost-control.mdx
  • router-tests/go.mod
  • router-tests/operations/testdata/introspection/base-graph-schema.json
  • router-tests/testenv/testdata/configWithEdfs.json
  • router/go.mod
✅ Files skipped from review due to trivial changes (1)
  • docs-website/router/security/cost-control.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • composition/src/errors/errors.ts

Comment thread router-tests/go.mod
@ysmolski
ysmolski merged commit aec1738 into main May 18, 2026
71 of 72 checks passed
@ysmolski
ysmolski deleted the yury/eng-9338-router-support-dot-path-in-slicingarguments branch May 18, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants